// Created by zyq on 2025/3/31.
#include "iostream"

using namespace std;

class TestPaper {
public:
    void Q1() {
        cout << "Q1: " << endl;
    }

    void Q2() {
        cout << "Q2: " << endl;
    }

    void Q3() {
        cout << "Q3: " << endl;
    }
};

class TestPaperA : public TestPaper {
public:
    void Q1() {
        cout << "Q1: A" << endl;
    }

    void Q2() {
        cout << "Q2: B" << endl;
    }

    void Q3() {
        cout << "Q3: C" << endl;
    }
};

class TestPaperB : public TestPaper {
public:
    void Q1() {
        cout << "Q1: D" << endl;
    }

    void Q2() {
        cout << "Q2: E" << endl;
    }

    void Q3() {
        cout << "Q3: F" << endl;
    }
};

int main() {
    cout << "TestPaperB" << endl;
    TestPaper *testPaper = new TestPaperA();
    testPaper->Q1();
    testPaper->Q2();
    testPaper->Q3();
    delete testPaper;
    cout << "TestPaperB" << endl;
    TestPaper *testPaper2 = new TestPaperB();
    testPaper2->Q1();
    testPaper2->Q2();
    testPaper2->Q3();
    delete testPaper2;
}